package service

import (
	"gin-client-go/pkg/client"
	"k8s.io/client-go/kubernetes"
	"k8s.io/klog"
)

var K8s k8s

type k8s struct {
	ClientSet *kubernetes.Clientset
}

func (k *k8s) Init() {
	clientSet, err := client.GetK8sClientSet()
	if err != nil {
		klog.Fatal("获取k8s客户端失败: ", err)
		return
	}
	k.ClientSet = clientSet
}
